FROM registry.cn-beijing.aliyuncs.com/limbooh/py3_6:base
ENV FLASK_APP flaskd.py
ENV FLASK_CONFIG production
USER flaskd

WORKDIR /home/flaskd

COPY requirements requirements
RUN venv/bin/pip install --upgrade pip
RUN venv/bin/pip install -r requirements/docker.txt

COPY app app
COPY migrations migrations
COPY flaskd.py config.py boot.sh .env logging_config.ini ./

# run-time configuration
EXPOSE 5000
ENTRYPOINT ["./boot.sh"]
